package com.paranoidmonkey.ode.Joint;

import com.paranoidmonkey.ode.AndrODE;
import com.paranoidmonkey.ode.World;

public class PU extends Joint{
	public PU(World world,JointGroup group){
		handle=AndrODE.dJointCreatePU (world.getHandle(), group.groupID);
	}
	public void setAnchor(float x, float y, float z){
		AndrODE.dJointSetPUAnchor (handle, x, y, z);
	}
	public void setAnchorOffset(float x, float y, float z, float dx, float dy,float dz){
		AndrODE.dJointSetPUAnchorOffset (handle, x, y, z, dx, dy,dz);
	}
	public void setAxis1(float x, float y, float z){
		AndrODE.dJointSetPUAxis1 (handle, x, y, z);
	}
	public void setAxis2(float x, float y, float z){
		AndrODE.dJointSetPUAxis2 (handle, x, y, z);
	}
	public void setAxis3(float x, float y, float z){
		AndrODE.dJointSetPUAxis3 (handle, x, y, z);
	}
	public void setAxisP(float x, float y, float z){
		AndrODE.dJointSetPUAxisP (handle, x, y, z);
	}
	public void setParam(int parameter, float value){
		AndrODE.dJointSetPUParam (handle, parameter, value);
	}
//	public void addTorque(float torque){
//		AndrODE.dJointAddPUTorque (handle, torque);
//	}
	public void getAnchor(float[] result){
		AndrODE.dJointGetPUAnchor (handle, result);
	}
	public float getPosition(){
		return AndrODE.dJointGetPUPosition (handle);
	}
	public float getPositionRate(){
		return AndrODE.dJointGetPUPositionRate (handle);
	}
	public void getAxis1(float[] result){
		AndrODE.dJointGetPUAxis1 (handle, result);
	}
	public void getAxis2(float[] result){
		AndrODE.dJointGetPUAxis2 (handle, result);
	}
	public void getAxis3(float[] result){
		AndrODE.dJointGetPUAxis3 (handle, result);
	}
	public void getAxisP(float[] result){
		AndrODE.dJointGetPUAxisP (handle, result);
	}
	public void getAngles(float[] angle1, float[] angle2){
		AndrODE.dJointGetPUAngles (handle, angle1, angle2);
	}
	public float getAngle1(){
		return AndrODE.dJointGetPUAngle1 (handle);
	}
	public float getAngle1Rate(){
		return AndrODE.dJointGetPUAngle1Rate (handle);
	}
	public float getAngle2(){
		return AndrODE.dJointGetPUAngle2 (handle);
	}
	public float getAngle2Rate(){
		return AndrODE.dJointGetPUAngle2Rate (handle);
	}
	public float getParam(int parameter){
		return AndrODE.dJointGetPUParam (handle, parameter);
	}

}
